﻿using PersistLayer.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PersistLayer.DAL
{
	public class LojaDAL
	{
		private Entities Entity;

		public LojaDAL()
		{
			Entity = new Entities();
		}

		public int Adicionar(Loja lj)
		{
			Entity.Loja.Add(lj);
			Entity.SaveChanges();
			return lj.ID;
		}
		public Loja Obter(int ID)
		{
			return Entity.Loja.Where(a => a.ID == ID).SingleOrDefault();
		}
	}
}
